public  class PhoneFormatter {
	//private static String parsePhoneNumberRegex = '(\\d{3})(\\d{3})(\\d{4})';
	//private static String desiredFormat = '($1) $2-$3';

	//private static Pattern pattern = Pattern.compile(parsePhoneNumberRegex);

	/**
	 * Formats the supplied phone number into the desired format if
	 * it is a recognized 10-digit phone number, otherwise returns null.
	 * @param phoneNumber	phone number to be transformed
	 * @return				correctly formatted phone number,
	 * 						otherwise null
	 */
	
//	public static String format(string phoneNumber) {
//		String formattedNumber = null;
//		if (phoneNumber != null) {
//			//remove any non-digits
//			String bareNumber = phoneNumber.replaceAll('[\\s.()-]', '');
//			formattedNumber = bareNumber;
//			/*if (bareNumber.matches('\\d{10}')) {
//				Matcher matcher = pattern.matcher(bareNumber);
//				if (matcher.matches()) {
//					//place the groups matched into the slots
//					formattedNumber = matcher.replaceAll(desiredFormat);
//				}
//			}*/
//		}
//
//		return formattedNumber;
//	}
	
}